import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);
// name: 与文件路径相关  一定要安装这种规则去配置
export const routes = [
  {
    path: "/",
    name: "demo01Index00",
    meta: { title: "1.项目介绍" },
    component: () => import("../views/demo01/index01.vue"),
  },
  {
    path: "/demo01/index01",
    name: "demo01Index01",
    meta: { title: "1.1 运行第一个threejs" },
    component: () => import("../views/demo01/index01.vue"),
  },
  {
    path: "/demo01/index02",
    name: "demo01Index02",
    meta: { title: "1.2 添加浏览器兼容性判断" },
    component: () => import("../views/demo01/index02.vue"),
  },
  {
    path: "/demo01/index03",
    name: "demo01Index03",
    meta: { title: "1.3 鼠标操作三维场景（引入轨道控制器）" },
    component: () => import("../views/demo01/index03.vue"),
  },
  {
    path: "/demo01/index04",
    name: "demo01Index04",
    meta: { title: "1.4 场景新增多个几何体、新增辅助坐标轴" },
    component: () => import("../views/demo01/index04.vue"),
  },
  {
    path: "/demo01/index05",
    name: "demo01Index05",
    meta: { title: "1.5 设置材质效果" },
    component: () => import("../views/demo01/index05.vue"),
  },
  {
    path: "/demo01/index06",
    name: "demo01Index06",
    meta: { title: "1.6 光源" },
    component: () => import("../views/demo01/index06.vue"),
  },

  {
    path: "/demo02/index01",
    name: "demo02Index01",
    meta: { title: "2.1 顶点数据结构解析" },
    component: () => import("../views/demo02/index01.vue"),
  },
  {
    path: "/demo02/index02",
    name: "demo02Index02",
    meta: { title: "2.2 顶点颜色插值计算" },
    component: () => import("../views/demo02/index02.vue"),
  },
  {
    path: "/demo02/index03",
    name: "demo02Index03",
    meta: { title: "2.3 顶点法向量数据光照计算" },
    component: () => import("../views/demo02/index03.vue"),
  },
  {
    path: "/demo02/index04",
    name: "demo02Index04",
    meta: { title: "2.4 顶点索引复用顶点数据" },
    component: () => import("../views/demo02/index04.vue"),
  },
  {
    path: "/demo02/index05",
    name: "demo02Index05",
    meta: { title: "2.5 顶点索引复用顶点数据" },
    component: () => import("../views/demo02/index05.vue"),
  },
  // Face3对象定义Geometry的三角形面  face3  因此版本不支持 geometry 不演示了
  {
    path: "/demo02/index06",
    name: "demo02Index06",
    meta: { title: "2.6 访问几何体对象的数据" },
    component: () => import("../views/demo02/index06.vue"),
  },
  {
    path: "/demo02/index07",
    name: "demo02Index07",
    meta: { title: "2.7 几何体旋转、缩放、平移变换" },
    component: () => import("../views/demo02/index07.vue"),
  },
  {
    path: "/demo03/index01",
    name: "demo03Index01",
    meta: { title: "3.1 常用材质介绍、及对应模型关系" },
    component: () => import("../views/demo03/index01.vue"),
  },
  {
    path: "/demo03/index02",
    name: "demo03Index02",
    meta: { title: "3.2 材质共有属性、私有属性" },
    component: () => import("../views/demo03/index02.vue"),
  },
  {
    path: "/demo04/index01",
    name: "demo04Index01",
    meta: { title: "4.1 点、线、网格模型介绍（及渲染模式）" },
    component: () => import("../views/demo04/index01.vue"),
  },
  {
    path: "/demo04/index02",
    name: "demo04Index02",
    meta: { title: "4.2 模型对象旋转平移缩放变换" },
    component: () => import("../views/demo04/index02.vue"),
  },
  {
    path: "/demo04/index03",
    name: "demo04Index03",
    meta: { title: "4.3 对象克隆 clone 和复制 copy" },
    component: () => import("../views/demo04/index03.vue"),
  },
  {
    path: "/demo05/index01",
    name: "demo05Index01",
    meta: { title: "5.1 常见光源类型、光源辅助、光源颜色计算" },
    component: () => import("../views/demo05/index01.vue"),
  },
  {
    path: "/demo05/index02",
    name: "demo05Index02",
    meta: { title: "5.2 光照阴影实时计算（平行光源投影）" },
    component: () => import("../views/demo05/index02.vue"),
  },
  {
    path: "/demo05/index03",
    name: "demo05Index03",
    meta: { title: "5.3 光照阴影实时计算（聚光光源投影）" },
    component: () => import("../views/demo05/index03.vue"),
  },
  {
    path: "/demo05/index04",
    name: "demo05Index04",
    meta: { title: "5.4 基类 Light 和 Object3D" },
    component: () => import("../views/demo05/index04.vue"),
  },
  {
    path: "/demo06/index01",
    name: "demo06Index01",
    meta: { title: "6.1 组对象 group 和层级模型" },
    component: () => import("../views/demo06/index01.vue"),
  },
  {
    path: "/demo06/index02",
    name: "demo06Index02",
    meta: { title: "6.2 层级模型节点命名-查找-遍历" },
    component: () => import("../views/demo06/index02.vue"),
  },
  {
    path: "/demo06/index03",
    name: "demo06Index03",
    meta: { title: "6.3 本地位置坐标-世界位置坐标" },
    component: () => import("../views/demo06/index03.vue"),
  },
  {
    path: "/demo07/index01",
    name: "demo01Index01",
    meta: { title: "7.1 常见几何体和曲线 api 介绍" },
    component: () => import("../views/demo07/index01.vue"),
  },
  {
    path: "/demo08/index01",
    name: "demo08Index01",
    meta: { title: "8.1 stats 性能检测" },
    component: () => import("../views/demo08/index01.vue"),
  },
  {
    path: "/demo08/index02",
    name: "demo08Index02",
    meta: { title: "8.2 抗锯齿与设置设备像素比" },
    component: () => import("../views/demo08/index02.vue"),
  },
  {
    path: "/demo09/index01",
    name: "demo09Index01",
    meta: { title: "9.1 gui库的使用" },
    component: () => import("../views/demo09/index01.vue"),
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
